<?php
    class Fupload extends CInputWidget
    {
        public function init()
        {
            //list($this->htmlOptions['name'], $this->htmlOptions['id']) = $this->resolveNameID();

            //$vendorDir = Yii::app()->getAssetManager()->publish($this->viewPath . '/../vendor/');
            //Yii::app()->clientScript->registerScriptFile($vendorDir . '/fupload.js');
//            Yii::app()->clientScript->registerCssFile($vendorDir . '/farbtastic.css');

//            $this->pickerId = $this->htmlOptions['id'] . '-picker';
//            Yii::app()->clientScript->registerScript($this->htmlOptions['id'] . '-loader', '$("#'.$this->pickerId.'").farbtastic("#'.$this->htmlOptions['id'].'")', CClientScript::POS_LOAD);
        }

        public function run()
        {
            //$this->model->{$this->attribute};
            $this->render('fupload');
        }
    }
?>
